#region

using TechTalk.SpecFlow;
using WatiN.Core;

#endregion

namespace UserStoryTrackerDemo.Specs.Steps.Watin
{
	[Binding]
	public class WebBrowser
	{
		public static Browser Current
		{
			get
			{
				if (!ScenarioContext.Current.ContainsKey("browser"))
					ScenarioContext.Current["browser"] = new IE();
				return (Browser) ScenarioContext.Current["browser"];
			}
		}

		[AfterScenario]
		public static void Close()
		{
			if (ScenarioContext.Current.ContainsKey("browser"))
				WebBrowser.Current.Close();
		}
	}
}